import { ProfileType } from '@/store/reducer/user';
import request from '@/utils/request';

export const getUserInfoAPI = () => {
  return request({ url: '/v1_0/user' });
};

export const getProfileAPI = () => {
  return request({ url: '/v1_0/user/profile' });
};

export const updatePhotoAPI = (data: FormData) => {
  return request({ url: '/v1_0/user/photo', method: 'PATCH', data });
};

export const updateProfileAPI = (data: Partial<ProfileType>) => {
  return request({ url: '/v1_0/user/profile', method: 'PATCH', data });
};
